/*
 * Problem:
 * Implement a Rectangle class which include the following attributes and methods:
 * 实现一个包含下列属性和方法的矩形类：
 *      1. Two public attributes width and height.
 *      1. 两个属性：宽和高
 *      2. A constructor which expects two parameters width and height of type int.
 *      2. 一个包含两个int类型的参数的构造函数
 *      3. A method getArea which would calculate the size of the rectangle and return.
 *      3. 一个计算矩形的尺寸并返回的getArea方法
 * 
 * Example:
 * Java:
 *      Rectangle rec = new Rectangle(3, 4);
 *      rec.getArea(); // should get 12
 */
package me.yobol.lintcode.naive.reacanglearea;

/**
 *
 * @author Yobol
 */
public class Rectangle {
    /*
     * Define two public attributes width and height of type int.
     */
    // write your code here
    public int width;
    public int height;

    /*
     * Define a constructor which expects two parameters width and height here.
     */
    // write your code here
    public Rectangle(int width,int height){
        this.width = width;
        this.height = height;
    }
    
    /*
     * Define a public method `getArea` which can calculate the area of the
     * rectangle and return.
     */
    // write your code here
    public int getArea(){
        return width * height;
    }               
}
